from fastapi import FastAPI
import uvicorn

app = FastAPI()


@app.get("/")
async def root():
    return "Hello World"

if __name__ == '__main__':
    uvicorn.run(app='7-fastapi启动helloworld:app', host="127.0.0.1", port=8001)
    # uvicorn.run(app='main:app', host="127.0.0.1", port=8001)